#version 300 es

precision highp float;

// 纹理对象，这里可以理解成图片
uniform sampler2D u_image;

// 从顶点着色器传入
in vec2 v_texCoord;

out vec4 outColor;

void main(){
    outColor=texture(u_image,v_texCoord);
    
    // 取周围像素一个像素
    // vec2 onePixel=vec2(1)/vec2(textureSize(u_image,0));
    // // average the left, middle, and right pixels.
    // outColor=(
        //     texture(u_image,v_texCoord)+
        //     texture(u_image,v_texCoord+vec2(onePixel.x,0.))+
        //     texture(u_image,v_texCoord+vec2(-onePixel.x,0.)))/3.;
    }